<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>添加字段</title>
    <hdjs />
    <js file= '__PUBLIC__/js/mod.base.js,__PUBLIC__/js/mod.field.js' />
    <css file= '__PUBLIC__/css/mod.base.css' />
</head>
<body>
    <form action="" method="post" class="hd-form" name="form" >
        <div class="hd-menu-list">
            <ul>
                <li>
                    <a href="{:U('Model/index')}">模型列表</a>
                </li>
                <li>
                    <a href="{:U('ModelField/index',array('mid'=>$_GET['mid']))}">字段列表</a>
                </li>
                <li class="active">
                    <a href="javascript:;">添加字段</a>
                </li>
            </ul>
        </div>
        <div class="hd-title-header">温馨提示</div>
        <div class="help">
            <ul>
                <li>{$model['remark']}请谨慎修改！</li>
            </ul>
        </div>
        <div class="hd-title-header">添加字段</div>
        <div class="right_content">
            <table class="hd-table hd-table-form">
                <tbody>
                    <tr>
                        <th class="hd-w100">
                            字段说明
                            <span class="star">*</span>
                        </th>
                        <td>
                            <input type="text" name="title" class="hd-w200"></td>
                    </tr>
                    <tr>
                        <th>
                            字段名称
                            <span class="star">*</span>
                        </th>
                        <td>
                            <input type="text" name="fname" class="hd-w200"></td>
                    </tr>
                    <tr>
                        <th>
                            排序
                            <span class="star">*</span>
                        </th>
                        <td>
                            <input type="text" name="sort" class="hd-w200" value="100"></td>
                    </tr>
                    <tr>
                        <th>
                            字段类型
                            <span class="star">*</span>
                        </th>
                        <td>
                            <!-- 1 文本 ，2多行文本 ，3 编辑器 4简单编辑器 ，5 单选框 ，6下拉框，7多选框 ，8文件上传框，9图片上传框 ， 10地区联动 -->
                            <select name="show_type" >
                                <option value="1">文本</option>
                                <option value="2">多行文本</option>
                                <option value="3">编辑器</option>
                                <option value="4">简单编辑器</option>
                                <option value="5">单选框</option>
                                <option value="6">下拉框</option>
                                <option value="7">多选框</option>
                                <option value="8">文件上传框</option>
                                <option value="9">图片上传框</option>
                                <!-- <option value="10">地区联动</option>
                            -->
                        </select>
                    </td>
                </tr>
                <tr>
                    <th>
                        字段验证
                        <span class="star">*</span>
                    </th>
                    <td>
                        <input type="text" name="validate" class="hd-w200" >
                        <select id="validate">
                            <option value="">验证规则</option>
                            <option value="/^\d+$/">数字</option>
                            <option value="/^([a-zA-Z0-9_\-\.])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/i">邮箱</option>
                            <option value="/^\d{11}$/">手机</option>
                            <option value="/(?:\(\d{3,4}\)|\d{3,4}-?)\d{8}/">固定电话</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <th>错误提示</th>
                    <td>
                        <input type="text" name="error" class="hd-w200" value=""></td>
                </tr>
                <tr>
                    <th>
                        是否必填
                        <span class="star">*</span>
                    </th>
                    <td>
                        <label>
                            <input name='require' type="radio" value="1" > 是</label>
                        &nbsp;
                        <label>
                            <input name='require' type="radio" value="0" checked="checked"> 否</label>
                    </td>
                </tr>

                <tr>
                    <th>
                        是否禁用
                        <span class="star">*</span>
                    </th>
                    <td>
                        <label>
                            <input name="is_disabled" type="radio" value="1" > 是</label>
                        &nbsp;
                        <label>
                            <input name="is_disabled" type="radio" value="0" checked="checked" > 否</label>
                    </td>
                </tr>
                <tr>
                    <th>
                        是否列表显示
                        <span class="star">*</span>
                    </th>
                    <td>
                        <label>
                            <input name='show_lists' type="radio" value="1" > 是</label>
                        &nbsp;
                        <label>
                            <input name='show_lists' type="radio" value="0" checked="checked"> 否</label>
                    </td>
                </tr>
                <tr>
                    <th>默认值</th>
                    <td>
                        <table class='single'>
                            <tr>
                                <td>
                                    <input type="text" name="value[]"></td>
                            </tr>
                        </table>

                        <table class='multiple'>
                            <tr>
                                <td>
                                    <input type="text" name="value[]">
                                    <span class='hand plus'>[+]</span>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <input type="hidden" name="mid" value="{$Think.get.mid}">
    <input type="submit" value="添加" class="hd-btn hd-btn-sm">
    <input type="button" value="返回" class="hd-btn hd-btn-sm" onclick="location.href='{:U('Field/index',array('mid'=>$_GET['mid']))}'">
    </form>

</body>
</html>